<html>
<head>
<script src="../resources/js-test.js"></script>

<script>

if (window.testRunner)
  testRunner.waitUntilDone();

function runAXTest() {


   description("This tests that an image map's hold on it's parent will be cleared if the parent goes away.");

   // First access all children using AX
   accessibilityController.accessibleElementById('dummy');

   var child = document.getElementById('img'); child.parentNode.removeChild(child);
 
   // Now verify we haven't crashed.
   accessibilityController.accessibleElementById('dummy');

   if (window.testRunner)
       testRunner.notifyDone();
}
</script>

</head>
<body>

<map name="map">
<div id="o7"></div>
<area id="o20" href="#"></area></map>

<img id="img" usemap="#map"><span></span> 

<script>setTimeout("runAXTest();", 1);</script> 

<p id="description"></p>
<div id="console"></div>

</body>
</html>
